Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: invalid boolean logic in UpdateDevice code #41

Merged
merged 1 commit into from
Jul 15, 2021

Conversation

ajcasagrande
Copy link
Contributor

Closes #33

Signed-off-by: Anthony Casagrande anthony.j.casagrande@intel.com

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What is the current behavior?

Device IP/Port changes, but service does not attempt to connect using new info.

Issue Number:

#33

What is the new behavior?

Device IP and Port are updated and a new connection is established:

level=INFO ts=2021-06-24T18:59:33.565052025Z app=edgex-device-rfid-llrp source=discover.go:427 msg="Discovered device: &{deviceName:SpeedwayR-11-25-D6 host:10.0.0.53 port:5093 vendor:25882 model:2001002}"
level=INFO ts=2021-06-24T18:59:33.565216561Z app=edgex-device-rfid-llrp source=discover.go:235 oldInfo="map[host:10.0.0.53 port:5092]" discoveredInfo="&{deviceName:SpeedwayR-11-25-D6 host:10.0.0.53 port:5093 vendor:25882 model:2001002}" msg="Existing device has been discovered with a different network address."
level=DEBUG ts=2021-06-24T18:59:33.565275015Z app=edgex-device-rfid-llrp source=manageddevices.go:127 msg="Updating managed Device: : SpeedwayR-11-25-D6\n"
level=INFO ts=2021-06-24T18:59:33.57958692Z app=edgex-device-rfid-llrp source=device.go:119 msg="Updated device: SpeedwayR-11-25-D6"
level=DEBUG ts=2021-06-24T18:59:50.643802737Z app=edgex-device-rfid-llrp source=driver.go:639 msg="Updating device: SpeedwayR-11-25-D6 protocols: map[metadata:map[model:2001002 vendorPEN:25882] tcp:map[host:10.0.0.53 port:5093]] adminState: UNLOCKED"
level=DEBUG ts=2021-06-24T19:00:22.594371624Z app=edgex-device-rfid-llrp source=logging.go:32 type=MsgKeepAlive device=SpeedwayR-10-EF-18 msg="Incoming LLRP message"
level=DEBUG ts=2021-06-24T19:00:23.000925592Z app=edgex-device-rfid-llrp source=logging.go:45 type=MsgKeepAlive device=SpeedwayR-10-EF-18 msg="Handled LLRP message."

Does this PR introduce a breaking change?

  • No

New Imports

  • No

edgexfoundry#33

Signed-off-by: Anthony Casagrande <anthony.j.casagrande@intel.com>
@ajcasagrande
Copy link
Contributor Author

@saites

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2021

Codecov Report

Merging #41 (fae2f57) into main (13be571) will increase coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   36.53%   36.58%   +0.04%     
==========================================
  Files          21       21              
  Lines        8075     8075              
==========================================
+ Hits         2950     2954       +4     
+ Misses       3987     3983       -4     
  Partials     1138     1138              
Impacted Files Coverage Δ
internal/driver/driver.go 22.03% <0.00%> (ø)
internal/llrp/reader.go 40.57% <0.00%> (+0.48%) ⬆️
internal/retry/retry.go 94.01% <0.00%> (+1.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13be571...fae2f57. Read the comment docs.

Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lenny-goodell lenny-goodell merged commit b1162a6 into edgexfoundry:main Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device discover IP address change requires service restart
3 participants